package com.baizhi.service.impl;

import com.baizhi.dao.GroupDao;
import com.baizhi.entity.Group;
import com.baizhi.service.GroupService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;

@Service
@Transactional
public class GroupServiceImpl implements GroupService {

    @Autowired
    private GroupDao groupDao;

    @Override
    @Transactional(propagation = Propagation.SUPPORTS)
    public List<Group> findAll() {
        return groupDao.findAll();
    }

    @Override
    public void save(Group group) {
        groupDao.save(group);
    }
}
